You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ClassScannerUtil.java
Core rewrite: scanning is now lazy (per-method-call) instead of eager (on construction), and the static ConcurrentHashMap cache is gone. Each call to getScannerForPackages now returns a fresh ClassScanner, and each getSubTypesOf/getClassesAnnotatedWith call triggers its own full classpath scan independently. Verify this is acceptable for all call sites.
Mechanical issues to be aware of:
performance:ClassScannerUtil.java
Cache removal means ForceSchemaCustomizer.customise() now triggers multiple independent classpath scans per invocation — once for getClassesAnnotatedWith, then once per matching class for getSubTypesOf. Previously a single scan result was shared. This is a startup-time regression if many classes match @ForceSwaggerSchema(includeSubTypes = true). Confirm the trade-off is acceptable.
error-handling:ClassScannerUtil.java:67 @SneakyThrows(ClassNotFoundException.class) hides a checked exception as an unchecked runtime exception. If Class.forName fails (e.g., a class in the scan index cannot be loaded), the stream will blow up with an unchecked exception and the caller gets no type-safe signal. This is a behavioral change from the old code. Make sure callers handle this.
test-coverage:ClassScannerUtilTest.java
Tests cover the fixture package well, but there is no test for the multi-package case where the same type would be returned by multiple package scans (no deduplication step in the stream — Collectors.toSet() handles it, but no test exercises this).
version:pom.xml:14
Version is set to 2.4.5-RC1 but the PR target says 2.4.5. If this is meant to be a final release, the -RC1 suffix needs to be removed before merge.
Low-risk / skim
pom.xml — Removes io.github.classgraph:classgraph:4.8.184 dependency and reformats the XML declaration line; no other changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
target: 2.4.5